<template>
  <div class="fss" v-if="echongs">
    <p>{{ yc.title }}</p>
    <div>
      <div v-for="v in yc.list" :key="v.gid" :id="v.gid" @click="xqychange(v.gid)">
        <div><img :src="v.img_src" alt="" /></div>
        <div>
          <p>{{ v.title }}</p>
          <img :src="v.goods_img" alt="" />
          <div>
            <span>￥{{ v.sale_price }}</span><br>
            <span>{{ v.be_interested }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "fengshang",
  computed: {
    ...mapState(["echongs"]),
    yc() {
      return this.echongs.data.datas.list[5].data;
    },
  },
  methods: {
    xqychange(gid){
      this.$router.push({
        name:'spInfo',
        query:{gid}
      })
    }
  },
};
</script>

<style scoped lang="less">
.fss {
  width: 97%;
  background-color: rgb(255, 255, 255);
  height: 6rem;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0.2rem 0.1rem;
  border-radius: .5rem;
  // font-size: .24rem;
  > p {
    font-size: 0.36rem;
    font-weight: 700;
  }
  > div {
    margin: 0 auto;
    width: 98%;
    height: 4.6rem;
    // background-color: #fff;
    border-radius: 0.2rem;
    // border: 1px solid red;
    > div {
      display: flex;
      height: 2.25rem;
      margin-bottom: .1rem;
    
      > div:nth-child(1) {
        > img {
          width: 3.8rem;
          border-radius: .2rem;

        }
      }
      > div:nth-child(2) {
        font-size: 0.3rem;
        border-radius: 0 0.5rem .2rem 0;
        width: 3.33rem;
        background-color: rgb(247,247,247);
        > p {
          margin: 0.1rem 0 0 0.1rem;
        }
        > img {
          width: 1rem;
          margin: 0.2rem;
          position: relative;
          top: 0.4rem;
          display: inline-block;
          border-radius: .2rem;

        }
        div {
          display: inline-block;
          width: 1.6rem;
          > span {
          }
          > span:nth-child(1) {
            font-weight: 700;
          }
          > span:nth-child(3) {
            font-size: .2rem;
          }
        }
      }
    }
  }
}
</style>